package com.hupo.dyapp_01.Mapper;

import com.hupo.dyapp_01.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    /**
     * 根据邮箱查询用户
     * @param email
     * @return
     */
    @Select("select * from user where email=#{email}")
    User selectByEmail(String email);

    /**
     * 新增用户
     * @param user
     * @return
     */
    int insert(User user);

    void updateByEmail(User user);
}
